home *** CD-ROM | disk | FTP | other *** search
/ DS-CD ROM 2 1993 August / DS CD-ROM 2.Ausgabe (August 1993).iso / programm / ds0248 / svga32k.inc < prev    next >
Text File  |  1991-12-06  |  1KB  |  47 lines

  1. (************************************************)
  2. (*                         *)
  3. (*     SuperVGA 32768 BGI driver defines    *)
  4. (*        Copyright (c) 1991        *)
  5. (*        Jordan Hargraphix Software        *)
  6. (*                        *)
  7. (************************************************)
  8.  
  9. (* These are the currently supported modes *)
  10. const
  11.   SVGA320x200x32768    = 0;    (* 320x200x32768 HiColor VGA *)
  12.   SVGA640x350x32768    = 1;    (* 640x350x32768 HiColor VGA *)
  13.   SVGA640x400x32768    = 2;    (* 640x400x32768 HiColor VGA *)
  14.   SVGA640x480x32768    = 3;    (* 640x480x32768 HiColor VGA *)
  15.   SVGA800x600x32768    = 4;    (* 800x600x32768 HiColor VGA *)
  16.  
  17.   XNOR_PUT        = 5;
  18.   NOR_PUT        = 6;
  19.   NAND_PUT        = 7;
  20.   TRANS_COPY_PUT    = 8;    (* Doesn't work on 16-color systems *)
  21.  
  22. function RGB(R,G,B : Word) : Word;
  23. begin
  24.   RGB := ((R and 31)SHL 10) OR ((G and 31)SHL 5) OR (B and 31);
  25. end;
  26.  
  27. function RealDrawColor(Color : Word) : Word;
  28. begin
  29.   if (GetMaxColor > 256) then
  30.     SetRgbPalette(1024,(Color SHR 10) AND 31,(Color SHR 5) AND 31,Color AND 31);
  31.   RealDrawColor := Color;
  32. end;
  33.  
  34. function RealFillColor(Color : Word) : Word;
  35. begin
  36.   if (GetMaxColor > 256) then
  37.     SetRgbPalette(1025,(Color SHR 10) AND 31,(Color SHR 5)AND 31,Color AND 31);
  38.   RealFillColor := Color;
  39. end;
  40.  
  41. function RealColor(Color : Word) : Word;
  42. begin
  43.   if (GetMaxColor > 256) then
  44.     SetRgbPalette(1026,(Color SHR 10) AND 31,(Color SHR 5)AND 31,Color AND 31);
  45.   RealColor := Color;
  46. end;
  47.